package com.newtouch.bxzs.common.base.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

/**
 * 接收客户记录表
 * <p>
 * <b>History:</b>
 * <table border="1">
 * <tr>
 * <th>Date</th>
 * <th>Operator</th>
 * <th>Memo</th>
 * </tr>
 * <tr>
 * <td>2021/1/12 13:23</td>
 * <td>Amour</td>
 * <td>Create</td>
 * </tr>
 * </table>
 *
 * @author Amour
 * @version 1.0.0
 * @since 1.0.0
 */
@Data
@TableName("ASSISTANT_ACCEPTION_CUSTOMER_RECORD")
public class AcceptionCustomerRecord {

    /**接收客户记录ID*/
    @TableId(value = "ACCEPTION_CUSTOMER_RECORD_ID", type = IdType.ASSIGN_UUID)
    private String accetptionCustomerRecordId;

    /**用户工号*/
    @TableField(value = "USER_JOB_NUMBER")
    private String userJobNumber;

    /**用户姓名*/
    @TableField(value = "USER_NAME")
    private String userName;

    /**用户证件类型*/
    @TableField(value = "USER_CERTIFICATE_TYPE")
    private String userCertificateType;

    /**用户证件号码*/
    @TableField(value = "USER_CERTIFICATE_NUMBER")
    private String userCertificateNumber;

    /**客户id*/
    @TableField(value = "CUSTOMER_ID")
    private String customerId;

    /**客户姓名*/
    @TableField(value = "CUSTOMER_NAME")
    private String customerName;

    /**客户证件类型*/
    @TableField(value = "CUSTOMER_CERTIFICATE_TYPE")
    private String customerCertificateType;

    /**客户证件号码*/
    @TableField(value = "CUSTOMER_CERTIFICATE_NUMBER")
    private String customerCertificateNumber;

    /**客户性别:1-男 2-女 3-其他*/
    @TableField(value = "CUSTOMER_SEX")
    private String customerSex;

    /**客户手机号*/
    @TableField(value = "CUSTOMER_PHONE")
    private String customerPhone;

    /**合作公司用户工号*/
    @TableField(value = "COOPERATION_COMPANY_USER_JOB_NUMBER")
    private String cooperationCompanyUserJobNumber;

    /**合作公司用户姓名*/
    @TableField(value = "COOPERATION_COMPANY_USER_NAME")
    private String cooperationCompanyUserName;

    /**合作公司用户证件类型*/
    @TableField(value = "COOPERATION_COMPANY_USER_CERTIFICATE_TYPE")
    private String cooperationCompanyUserCertificateType;

    /**合作公司用户证件号码*/
    @TableField(value = "COOPERATION_COMPANY_USER_CERTIFICATE_NUMBER")
    private String cooperationCompanyUserCertificateNumber;

    /**保单号*/
    @TableField(value = "POLICY_NUMBER")
    private String policyNumber;

    /**意向登记描述*/
    @TableField(value = "INTENTION_REGISTRATION_DESCRIPTION")
    private String intentionRegistrationDescription;

    /**意向登记类型:1-投保,2-保全,3-理赔*/
    @TableField(value = "INTENTION_REGISTRATION_TYPE")
    private String intentionRegistrationType;

    /**推送客户记录ID*/
    @TableField(value = "PUSH_CUSTOMER_RECORD_ID")
    private String pushCustomerRecordId;

    /**创建时间*/
    @TableField(value = "CREATE_TIME")
    @JsonFormat(pattern="yyyy-MM-dd hh:mm:ss", locale="zh", timezone="GMT+8")
    private Date createTime;

    /**创建用户ID*/
    @TableField(value = "CREATE_USER_ID")
    private String createUserId;

    /**修改时间*/
    @TableField(value = "UPDATE_TIME")
    @JsonFormat(pattern="yyyy-MM-dd hh:mm:ss", locale="zh", timezone="GMT+8")
    private Date updateTime;

    /**修改用户ID*/
    @TableField(value = "UPDATE_USER_ID")
    private String updateUserId;

    /**修改用户ID*/
    @TableField(value = "MEMO")
    private String memo;

    /**推送来源:
     1-营销会议推送
     2-营销活动推送
     3-保单意向推送
     4-产品意向推送
     5-客户推送*/
    @TableField(value = "PUSH_SOURCE")
    private String pushSource;

    /**推送来源ID*/
    @TableField(value = "PUSH_SOURCE_ID")
    private String pushSourceId;

    /**推送客户状态:
     1-未接收
     2-已接收
     3-已升级
     4-已撤回
     5-已处理*/
    @TableField(value = "PUSH_CUSTOMER_STATUS")
    private String pushCustomerStatus;

    /**企业客户的统一社会信用代码*/
    @TableField(value = "UNIFIED_SOCIAL_CREDIT_CODE")
    private String unifiedSocialCreditCode;

    /**企业客户姓名*/
    @TableField(value = "ENTERPRISE_CUSTOMER_NAME")
    private String enterpriseCustomerName;

    /**
     * 转换推送信息
     * @param userName
     * @param userJobNumber
     * @param userCertificateType
     * @param userCertificateNumber
     * @param cooperationCompanyUserJobNumber
     * @param cooperationCompanyUserName
     * @param cooperationCompanyUserCertificateType
     * @param cooperationCompanyUserCertificateNumber
     * @param createTime
     * @param createUserId
     */
    public void changPushInformation(String userName,String userJobNumber,
                                     String userCertificateType,String userCertificateNumber,
                                     String cooperationCompanyUserJobNumber,String cooperationCompanyUserName,
                                     String cooperationCompanyUserCertificateType,String cooperationCompanyUserCertificateNumber,
                                     Date createTime,String createUserId){
        this.userName = userName;
        this.userJobNumber = userJobNumber;
        this.userCertificateType = userCertificateType;
        this.userCertificateNumber = userCertificateNumber;
        this.cooperationCompanyUserJobNumber = cooperationCompanyUserJobNumber;
        this.cooperationCompanyUserName = cooperationCompanyUserName;
        this.cooperationCompanyUserCertificateType = cooperationCompanyUserCertificateType;
        this.cooperationCompanyUserCertificateNumber = cooperationCompanyUserCertificateNumber;
        this.createTime = createTime;
        this.createUserId = createUserId;
    }

    /**
     * 修改接收状态赋值
     * @param accetptionCustomerRecordId
     * @param pushCustomerStatus
     * @param updateUserId
     * @param updateTime
     */
    public void setUpdateStatus(String accetptionCustomerRecordId,String pushCustomerStatus,String updateUserId,Date updateTime){
        this.accetptionCustomerRecordId = accetptionCustomerRecordId;
        this.pushCustomerStatus = pushCustomerStatus;
        this.updateUserId = updateUserId;
        this.updateTime = updateTime;
    }


}
